package cn.broadsense.thrid.param;

import cn.broadsense.thrid.result.VehiclePicTaskResult;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 车辆以图搜图任务
 *
 * @author pengxin
 * @date 2022-10-14 12:20
 */
@NoArgsConstructor
@Data
public class VehiclePicTaskParam extends BaseParam{
    private static final long serialVersionUID = -8614030557521562462L;
    private ImageParam image;
    private String feature;
    private String startTimeStr;
    private String endTimeStr;
    private List<String> channelCodes;
    private String carStyleName;
    private Integer carColor;
    private Double threshold;
    private Integer resultNum;
    private Integer operate;
    private List<RectsParam> rects;


    @Override
    public void checkParam() {

    }

    @Override
    public Class getResultClass() {
        return VehiclePicTaskResult.class;
    }

    @NoArgsConstructor
    @Data
    public static class ImageParam {
        private String data;
        private String uri;
        private RectParam rect;

        @NoArgsConstructor
        @Data
        public static class RectParam {
            private Integer leftTopX;
            private Integer leftTopY;
            private Integer rightBtmX;
            private Integer rightBtmY;
        }
    }

    @NoArgsConstructor
    @Data
    public static class RectsParam {
        private Integer weight;
        private Integer x;
        private Integer y;
        private Integer w;
        private Integer h;
    }
}
